import Vue from 'vue'
const filters = {
    handleStr: function(val){
        if (val.length > 4) {
            console.log(44444);
            return val.slice(0, 4) + "..."
        }
        return val;
    },
    playCount: function(num) {
        if(num>=100000000){
            return Math.floor(num/10000000)/10+"亿"
        }else if(num>=10000){
            return Math.floor(num/1000)/10+"万"
        }
        return num
    }
}
for(const key in filters){
    Vue.filter(key,filters[key])
}